import request from '@/utils/request'

// 获取部门tree
export function getDeptTree(data) {
  return request({
    url: '/api/admin/getDeptTree',
    method: 'get',
    params: data
  })
}

// 修改部门
export function updateDept(data) {
  return request({
    url: '/api/admin/updateDept',
    method: 'put',
    data: data
  })
}

// 增加部门
export function addDept(data) {
  return request({
    url: '/api/admin/addDept',
    method: 'post',
    data: data
  })
}

// 删除部门
export function deleteDept(data) {
  return request({
    url: '/api/admin/deleteDept/' + data,
    method: 'delete'
  })
}
